﻿
using System ;

using MskEdit.Sdk ;
using MskEdit.Dxf.Representation ;


namespace MskEdit.Dxf.Model
{

    public class DxfAttdefEntity : DxfEntity
    {
        private static DxfSignature         signature_      = new DxfSignature( "0", "ATTDEF", "0", "" ) ;
        private static ConstructorHandler   constructor_    = (a, b) => { return new DxfAttdefEntity(a, b) ; } ;


        private DxfAttdefEntity( string[] allLines, SdkSubrange subrange ) : base( allLines, subrange ) {
        }


        public static DxfAttdefEntity TryFrom( string[] allLines, ref int lineNo, DxfAttdefEntity fallbackValue ) {
            return (DxfAttdefEntity) DxfStructBase.TryConstruct( allLines, ref lineNo, signature_, constructor_, fallbackValue ) ;
        }

        
        public string Tag {
            get { return TryFindFirstValue( "2", "<not found>") ; }
        }

        
        public string Prompt {
            get { return "\"" + TryFindFirstValue( "3", "<not found>") + "\"" ; }
        }
        
        
        public override string Caption {
            get { return base.Caption + " " + Tag + " " + Prompt ; }
        }

    }
}
